using System;

namespace libcharakter
{
	[Serializable]
	public class Attribute
	{
		protected string m_strName;
		protected int m_shValue;
		protected TableColum m_tblColum;
		protected bool m_bErleichtert;
		protected int m_modifikator;
		protected Charakter m_charaker;

		public string Name { get { return m_strName; } }
		public int Value { get { return m_shValue + m_modifikator; } set { m_shValue = value;  }  }
		public bool Erleichtert { get { return m_bErleichtert; } }
		public int Modifikator { get { return m_modifikator; } set { m_modifikator = value; } }
		public int BasicValue { get { return m_shValue; } set { m_shValue = value; } }
		public Charakter Charakter { get { return m_charaker; } }

		protected Attribute (string name, int value, short mod, TableColum Colum, bool erleichtert, Charakter charakter)
		{
			m_strName = name;
			m_shValue = value;
			m_tblColum = Colum;
			m_bErleichtert = erleichtert;
			m_modifikator = mod;
			m_charaker = charakter;
		}

        public virtual void Update (Charakter charakter)
		{
		}

		public override string ToString ()
		{
			return string.Format ("{0} ({1}): {2} {3} {4}", Name, m_tblColum, BasicValue, Modifikator, Value);
		}
	}
}

